package com.example.houseitemmanagebackend.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 物品数据传输对象
 */
@Data
public class ItemDTO {

    private Integer id;

    private String name;

    private Integer categoryId;

    private Integer locationId;

    private String specificLocation;

    @Min(value = 1, message = "物品数量最小为1")
    private Integer quantity;

    private Integer isConsumable;

    private BigDecimal price;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate purchaseDate;

    private String purchaseChannel;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate expiryDate;

    private String status;

    private String notes;

    private Integer iconId;

    private String brand;

    private String specification;

    private Integer warranty;

    private BigDecimal rating;

}